{% extends 'base.html' %}
{% load staticfiles %}
{% block title %} IDC管理 {% endblock %}
{% block custom_css %}

<link href="https://magicbox.bkclouds.cc/static_api/v3/assets/artDialog-6.0.4/css/ui-dialog.css" rel="stylesheet">
{% endblock %}
{% block content %}

        <div class="bk-panel">
                  <div class="panel-body">
            <div class="king-wrapper clearfix">
                <form class="form-inline king-search-form king-no-bg pull-left">

                    <div class="form-group">
                        <div class="input-group king-input-group">
                            <input type="text" class="form-control pl30 king-form-control" placeholder="请输入关键字">
                            <span class="glyphicon glyphicon-search form-control-feedback king-form-control-feedback"></span>
                        </div>
                    </div>

                </form>
                <a href="{%  url 'assets:idc_add'  %}" class="king-btn king-btn-new pull-right">
                    新建机房
                </a>
            </div>
        </div>
        </div>

    <div>
            <table class="table table-hover mb0">
                <thead>
                    <tr class="active">
                        <th style="width:45px">ID</th>
                        <th style="min-width:100px">机房名称</th>
                        <th style="min-width:80px">联系人</th>
                        <th style="min-width:80px">电话</th>
                        <th style="min-width:80px">备用电话</th>
                        <th style="min-width:100px">创建时间</th>
                        <th style="min-width:250px">机房地址</th>
                        <th style="width:100px">创建人</th>
                        <th style="width:565px">操作</th>
                    </tr>
                </thead>
                <tbody id="datas">
                {% for  idc in all_idc %}
                    <tr style="display: table-row; opacity: 1;">
                        <td>{{ idc.id }}</td>
                        <td>{{ idc.name }}</td>
                         <td>{{ idc.contact_user }}</td>
                        <td>{{ idc.mobile }}</td>
                         <td>{{ idc.other_mobile }}</td>
                         <td>{{ idc.create_time }}</td>
                         <td>{{ idc.address }}</td>
                        <td>admin</td>
                        <td>
                            <a href="{% url 'assets:idc_update' idc.id %}" class="king-btn king-default">修改</a>
                            <a href="javascript:detete_idc({{ idc.id }})" class="king-btn king-danger">删除</a>
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
                <tfoot>
                    <tr>
                        <td colspan="9">
                            <div class="pull-right king-page-box">
                                <p class="pull-left mt15 mr15">
                                    共<span id="total">25</span>条记录，当前第<span id="cur_page">1</span>/<span id="total_page">5</span>页
                                </p>
                                <ul class="pagination pagination-sm pull-left mt10">
                                    <li class="disabled">
                                        <a href="javascript:;" aria-label="Previous">
                                            <span aria-hidden="true">«</span>
                                        </a>
                                    </li>
                                    <li class="active"><a href="javascript:;">1</a></li>
                                    <li><a href="javascript:;">2</a></li>
                                    <li><a href="javascript:;">3</a></li>
                                    <li><a href="javascript:;">4</a></li>
                                    <li><a href="javascript:;">5</a></li>
                                    <li>
                                        <a href="javascript:;" aria-label="Next">
                                            <span aria-hidden="true">»</span>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </tfoot>
            </table>
        </div>

{% endblock %}

{% block custom_js %}
<script src="https://magicbox.bkclouds.cc/static_api/v3/assets/artDialog-6.0.4/dist/dialog-min.js"></script>
    <script src="{% static 'js/app.js' %}"></script>
{% endblock %}